package com.rk.pethome.product.service.impl;

import com.rk.pethome.basic.service.impl.BaseServiceImpl;
import com.rk.pethome.product.domain.Product;
import com.rk.pethome.product.service.IProductService;
import org.springframework.stereotype.Service;

@Service
public class IProductServiceImpl extends BaseServiceImpl<Product> implements IProductService {

    /**
     * 新增/修改服务
     *
     * @param product
     */
    @Override
    public void addOrUpdate(Product product) {
        if(product.getId()==null){
            super.add(product);
        }else {
            super.update(product);
        }

    }
}
